﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;


namespace ZGameFramework
{
    public static partial class Utility
    {
        /// <summary>
        /// 时间相关的实用函数。
        /// </summary>
        public static class Time
        {
    
            public static string FormatYYMMDD(long ticks)
            {
                return null;
            }

           
            /// <summary>
            /// 格式化时间 HMS
            /// </summary>
            /// <param name="time"></param>
            /// <returns></returns>
            public static string FormatHMS(long secondTime)
            {
                long hour = 0;
                long minute = 0;
                long second = 0;

                hour = secondTime / 3600;
                minute = (secondTime % 3600) / 60;
                second = secondTime % 60;

                return Text.Format( "{0:00}:{1:00}:{2:00}", hour, minute, second);
            }

            /// <summary>
            /// 格式化时间 MS
            /// </summary>
            /// <param name="time"></param>
            /// <returns></returns>
            public static string FormaMS(long secondTime)
            {
                long minute = 0;
                long second = 0;

                minute = (secondTime % 3600) / 60;
                second = secondTime % 60;

                return Text.Format("{0:00}:{1:00}", minute, second);
            }

        }
    }
}
